package components.editor {
	import UIFree.command.uif_commandManager;
	import UIFree.uif_component;
	
	import classes.Commands.c_insertMaskCommand;
	import classes.c_events;
	import classes.c_imageTypes;
	import classes.c_layerAdjustType;
	import classes.menu.c_clothingMenu;
	
	import flash.display.Bitmap;
	import flash.display.BitmapData;
	import flash.events.Event;
	import flash.external.ExternalInterface;
	import flash.ui.Keyboard;
	import flash.utils.ByteArray;
	
	public class c_clothingEditor extends c_baseCollagesEditor {
		
		
		public function c_clothingEditor(parent:uif_component) {
			super(parent);
		}
		
		override protected function listenEvents():void {
			super.listenEvents();
		}
		
		override protected function get mainMenu():Array {
			return ExternalInterface.call('getClothingMenu', c_clothingMenu.list()); 
		}
		
		protected function doOpenMask(e: Event): void {
			openFileDialog(function(a_data: ByteArray, a_fileType: String): void {
				c_imageTypes.baToBmd(a_data, function(bmd: BitmapData): void {
					executeCommand(new c_insertMaskCommand(This, new Bitmap(bmd)));
					bmd.dispose();
				});
			});
		}
	}
}